#include "UdpServer.hpp"
#include <iostream>
#include <memory>
#include <cstdio>
#include <vector>

std::string Handler(const std::string &str, const std::string& clientip, uint16_t clientport)
{
    std::string res = "[";
    res += clientip;
    res += ":";
    res += std::to_string(clientport);
    res += "]#";
    res += str;
    return res;
}
int main()
{
    std::unique_ptr<UdpServer> udpserver(new UdpServer);
    udpserver->Init();
    udpserver->Run(Handler);
    return 0;
}